package foo;

public abstract class Task {
	TaskState state = TaskState.NOTSTARTED;

	public TaskState getState() {
		return state;
	}

	public void perform() {
		state = TaskState.STARTED;
		execute();
		state = TaskState.COMPLETED;
	}

	abstract protected void execute();
}
